#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#include"stdio.h"
void Print(int n)
{
	if (n > 9)
	{
		Print(n / 10);
	}
	printf("%d ", n % 10);
}


int main()
{
	int unsigned num;
	scanf("%u", &num);
	Print(num);
	return 0;
}